/* 增强状态指示器样式 */
.statusIndicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 2px solid;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 尺寸变体 */
.statusIndicator.small {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 12px;
  gap: 4px;
}

.statusIndicator.medium {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 16px;
  gap: 6px;
}

.statusIndicator.large {
  padding: 8px 16px;
  font-size: 15px;
  border-radius: 20px;
  gap: 8px;
}

/* 可点击状态 */
.statusIndicator.clickable {
  cursor: pointer;
  user-select: none;
}

.statusIndicator.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.statusIndicator.clickable:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 状态图标 */
.statusIcon {
  font-size: 1.2em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.small .statusIcon {
  font-size: 1em;
}

.large .statusIcon {
  font-size: 1.4em;
}

/* 状态标签 */
.statusLabel {
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.small .statusLabel {
  font-weight: 500;
}

/* 房间号 */
.roomNumber {
  font-size: 0.9em;
  opacity: 0.8;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

/* 优先级徽章 */
.priorityBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: priorityPulse 2s infinite ease-in-out;
}

.priorityBadge[data-priority="high"] {
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
}

.priorityBadge[data-priority="medium"] {
  background: linear-gradient(135deg, #ffa502, #ff8c00);
  color: white;
}

.small .priorityBadge {
  width: 14px;
  height: 14px;
  top: -4px;
  right: -4px;
  font-size: 8px;
}

.large .priorityBadge {
  width: 22px;
  height: 22px;
  top: -8px;
  right: -8px;
  font-size: 12px;
}

/* 脉冲效果 */
.statusIndicator.pulse {
  animation: statusPulse 2s infinite ease-in-out;
}

.pulseEffect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  opacity: 0.3;
  animation: ripple 2s infinite ease-out;
}

/* 动画定义 */
@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes priorityPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* 状态特定样式增强 */
.statusIndicator[style*="rgb(255, 75, 87)"] { /* 危险状态 - 红色系 */
  box-shadow: 0 4px 20px rgba(255, 75, 87, 0.3);
}

.statusIndicator[style*="rgb(255, 165, 2)"] { /* 警告状态 - 橙色系 */
  box-shadow: 0 4px 20px rgba(255, 165, 2, 0.3);
}

.statusIndicator[style*="rgb(82, 196, 26)"] { /* 成功状态 - 绿色系 */
  box-shadow: 0 4px 20px rgba(82, 196, 26, 0.3);
}

.statusIndicator[style*="rgb(24, 144, 255)"] { /* 信息状态 - 蓝色系 */
  box-shadow: 0 4px 20px rgba(24, 144, 255, 0.3);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .statusIndicator {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  }

  .statusIndicator.clickable:hover {
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
  }

  .roomNumber {
    background: rgba(0, 0, 0, 0.2);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .statusIndicator.medium {
    padding: 5px 10px;
    font-size: 12px;
    gap: 5px;
  }

  .statusIndicator.large {
    padding: 6px 12px;
    font-size: 13px;
    gap: 6px;
  }

  .roomNumber {
    font-size: 0.85em;
    padding: 1px 4px;
  }
}

@media (max-width: 480px) {
  .statusIndicator {
    max-width: 120px;
  }

  .statusLabel {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .roomNumber {
    display: none;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .statusIndicator {
    border-width: 3px;
    font-weight: 700;
  }

  .priorityBadge {
    border: 2px solid white;
  }
}
